<table class="view-form-input" border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr>
    <th valign="top" class="td-title"><label for="catid"><font class="required">*</font>分类模型：</label></th>
    <td class="td-input">
    <?php
	$sql="SELECT modelid,name FROM `submodule_models` where type = 'category'";
	$category_models = Yii::$app->db->createCommand($sql)->queryAll();
	$select =  '<select id="param_modelid" name="Field[param][modelid]">
	            <option>请选择</option>';
				foreach($category_models as $v){
	$select .=  '<option value="'.$v['modelid'].'"';
	if (isset($param['modelid']) && $param['modelid'] == $v['modelid']) $select .=  ' selected';
	$select .=  '>'.$v['name'].'(id:'.$v['modelid'].')</option>';
				}
	$select .=  '</select>';
	echo $select;
	
	?>
</td>
  </tr>
  <tr>
    <th valign="top" class="td-title"><label for="catid"><font class="required">*</font>父栏目ID：</label></th>
    <td class="td-input"><input type="text" name="Field[param][parentid]" class="input-text" style="width:50px;" value="<?php echo isset($param['parentid']) ? $param['parentid'] : '0'?>"></td>
  </tr>
  <tr>
    <th valign="top" class="td-title"><label for="catid"><font class="required">*</font>下拉框宽：</label></th>
    <td class="td-input"><input type="text" id="param_width" name="Field[param][width]" class="input-text" style="width:50px;" value="<?php echo isset($param['width']) ? $param['width'] : '120'?>">px</td>
  </tr>
  <tr>
    <th valign="top" class="td-title"><label for="catid"><font class="required">*</font>z-index：</label></th>
    <td class="td-input"><input type="text" name="Field[param][z-index]" class="input-text" style="width:50px;" value="<?php echo isset($param['z-index']) ? $param['z-index'] : '99'?>"></td>
  </tr>
  <tr>
    <th valign="top" class="td-title"><label for="catid">联动分类：</label></th>
    <td class="td-locked td-input" style="width:auto"><div onclick="change_switch(this, '');" id="btn-locked" class="locked-<?php echo intval(@$param['linkage']);?>"></div>
    <input type="checkbox" id="param_width" name="Field[param][linkage]" class="hidden" value="1" <?php echo isset($param['linkage']) ? ' checked' : ''?>>
    </td> 
  </tr>
  <tr class="linkage">
    <th valign="top" class="td-title"><label for="catid">联动关联字段：</label></th>
    <td class="td-input"><input type="text" name="Field[param][linkageId]" class="input-text" style="width:100px;" value="<?php echo isset($param['linkageId']) ? $param['linkageId'] : ''?>"></td>
  </tr>
  <tr class="linkage">
    <th valign="top" class="td-title"><label for="catid">联动查询表：</label></th>
    <td class="td-input"><input type="text" name="Field[param][linkageTable]" class="input-text" style="width:100px;" value="<?php echo isset($param['linkageTable']) ? $param['linkageTable'] : ''?>"></td>
  </tr>
  <tr class="linkage">
    <th valign="top" class="td-title"><label for="catid">联动查询表字段：</label></th>
    <td class="td-input"><input type="text" name="Field[param][linkageField]" class="input-text" style="width:100px;" value="<?php echo isset($param['linkageField']) ? $param['linkageField'] : ''?>"></td>
  </tr>
  <tr class="linkage">
    <th valign="top" class="td-title"><label for="catid">OPTION value字段：</label></th>
    <td class="td-input"><input type="text" name="Field[param][linkageValue]" class="input-text" style="width:100px;" value="<?php echo isset($param['linkageValue']) ? $param['linkageValue'] : ''?>"></td>
  </tr>
  <tr class="linkage">
    <th valign="top" class="td-title"><label for="catid">OPTION text字段：</label></th>
    <td class="td-input"><input type="text" name="Field[param][linkageText]" class="input-text" style="width:100px;" value="<?php echo isset($param['linkageText']) ? $param['linkageText'] : ''?>"></td>
  </tr>
</table>
<SCRIPT LANGUAGE="JavaScript">
<!--

$("#param_modelid").rules("add", { required: true});

//-->
</SCRIPT>